﻿using BBCore.Core.Models.Admins;

namespace BBCore.Application.Admins
{
    public interface IAnnouncementsService
    {
        /// <summary>
        /// 载入公告栏前n条记录,按最新日期排序
        /// </summary>
        /// <returns>前n条记录</returns>
        Task<List<Announcement>?> LoadAnnouncements_TopAsync();
        /// <summary>
        /// 根据公告栏ID和用户ID得到此条消息是否已读
        /// </summary>
        /// <param name="announcementId">公告栏ID</param>
        /// <param name="userid">用户ID</param>
        /// <returns>是否已读</returns>
        bool IsAnnouncementRead(int announcementId, int userid);
        /// <summary>
        /// 根据公告栏ID和用户ID标记此条消息为已读
        /// </summary>
        /// <param name="announcementId">公告栏ID</param>
        ///  <param name="userid">用户ID</param>
        /// <returns></returns>
        Task MarkAsReadAsync(int announcementId, int userid);
    }
}
